/*
 * Copyright [2022] [https://www.xiaonuo.vip]
 *
 * Snowy采用APACHE LICENSE 2.0开源协议，您在使用过程中，需要注意以下几点：
 *
 * 1.请不要删除和修改根目录下的LICENSE文件。
 * 2.请不要删除和修改Snowy源码头部的版权声明。
 * 3.本项目代码可免费商业使用，商业使用请保留源码和相关描述文件的项目出处，作者声明等。
 * 4.分发源码时候，请注明软件出处 https://www.xiaonuo.vip
 * 5.不可二次分发开源参与同类竞品，如有想法可联系团队xiaonuobase@qq.com商议合作。
 * 6.若您的项目无法满足以上几点，需要更多功能代码，获取Snowy商业授权许可，请在官网购买授权，地址为 https://www.xiaonuo.vip
 */
package vip.xiaonuo.biz.modular.lesson.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fhs.core.trans.anno.Trans;
import com.fhs.core.trans.constant.TransType;
import com.fhs.core.trans.vo.TransPojo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import vip.xiaonuo.biz.modular.course.entity.EduCourse;
import vip.xiaonuo.biz.modular.lecture.entity.EduLecture;
import vip.xiaonuo.biz.modular.room.entity.EduRoom;
import vip.xiaonuo.biz.modular.teacher.entity.EduTeacher;
import vip.xiaonuo.biz.modular.timeslot.entity.EduTimeslot;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 排课实体
 *
 * @author liye
 * @date  2023/08/06 10:18
 **/
@Getter
@Setter
@TableName("edu_lesson")
public class EduLesson implements TransPojo {

    /** ID */
    @TableId(type = IdType.AUTO) // 指定主键为自增类型
    @ApiModelProperty(value = "ID", position = 1)
    private Long id;

    /** 时段id */
    @ApiModelProperty(value = "时段id", position = 2)
    @TableField(insertStrategy = FieldStrategy.IGNORED,updateStrategy = FieldStrategy.IGNORED)
    @Trans(type = TransType.SIMPLE,target = EduTimeslot.class,fields = "name",alias = "timeslot",ref = "timeslotName")
    private Long timeslotId;

    /** 教室id */
    @ApiModelProperty(value = "教室id", position = 3)
    @TableField(insertStrategy = FieldStrategy.IGNORED,updateStrategy = FieldStrategy.IGNORED)
    @Trans(type = TransType.SIMPLE,target = EduRoom.class,fields = "name",alias = "room",ref = "roomName")
    private Long roomId;

    /** 开课id */
    @ApiModelProperty(value = "开课id", position = 4)
    @TableField(insertStrategy = FieldStrategy.IGNORED,updateStrategy = FieldStrategy.IGNORED)
    @Trans(type = TransType.SIMPLE,target = EduLecture.class,fields = {"teacherId", "courseId", "size"},refs = {"teacherId", "courseId", "lectureSize"},sort=0)
    private String lectureId;

    @ApiModelProperty(value = "时段名称", position = 5)
    @TableField(exist = false)
    private String timeslotName;

    @ApiModelProperty(value = "教室名称", position = 6)
    @TableField(exist = false)
    private String roomName;

    @ApiModelProperty(value = "开课人数", position = 7)
    @TableField(exist = false)
    private Integer lectureSize;

    @ApiModelProperty(value = "教师id", position = 8)
    @Trans(type = TransType.SIMPLE,target = EduTeacher.class,fields={"name"},refs={"teacher"},sort=1)
    @TableField(exist = false)
    private String teacherId;

    @ApiModelProperty(value = "课程id", position = 9)
    @Trans(type = TransType.SIMPLE,target = EduCourse.class,fields={"name"},refs={"subject"},sort=2)
    @TableField(exist = false)
    private String courseId;

    @ApiModelProperty(value = "教师姓名", position = 10)
    private String teacher;

    @ApiModelProperty(value = "课程名称", position = 11)
    private String subject;

    @ApiModelProperty(value = "班级名称", position = 12)
    private String studentGroup;

    @ApiModelProperty(value = "锁定", position = 13)
    private Boolean locked;

    @ApiModelProperty(value = "教室类型", position = 14)
    @Trans(type = TransType.DICTIONARY, key = "ROOM_TYPE")
    private String roomType;

    @ApiModelProperty(value = "开始周", position = 15)
    private Integer startWeek;

    @ApiModelProperty(value = "结束周", position = 16)
    private Integer endWeek;

    @ApiModelProperty(value = "长课时", position = 17)
    private Boolean extended;
}
